import request from "@/utils/request";

//【首页】查询专项年份
export function getYear() {
    return request({
        url: "/assign/sp/year",
        method: "get",
    });
}

//【首页】专项列表
export function getAssignList(data) {
    return request({
        url: "/assign/sp/list",
        method: "post",
        data: data,
    });
}

//【首页】网格预警 列表
export function getGwarningList(data) {
    return request({
        url: "/guser/gwarning/list",
        method: "post",
        data,
    });
}

//【首页】日常交办数量
export function getAssignCount(data) {
    return request({
        url: "/assign/dr/count",
        method: "post",
        data,
    });
}

//【首页】日常管理 分页
export function getAssignProPage(data) {
    return request({
        url: "/assign/problem/page",
        method: "post",
        data,
    });
}

//专项基础信息详情
export function getBaseInfo(specialProjectId) {
    return request({
        url: `/assign/sp/base/${specialProjectId}`,
        method: "get",
    });
}

//专项企业列表
export function getEnterpriseList(data) {
    return request({
        url: "/assign/sp/enterprise/list",
        method: "post",
        data,
    });
}

//专项企业问题列表
export function getEnProblemList(data) {
    return request({
        url: "/assign/sp/en/problem/list",
        method: "post",
        data,
    });
}

//专项交办问题详情
export function getProblemRecordList(data) {
    return request({
        url: `/assign/sp/body/problem/record/list`,
        method: "post",
        data
    });
}

//专项问题列表
export function getSpProblemList(data) {
    return request({
        url: "/assign/sp/problem/list",
        method: "post",
        data,
    });
}

//新增专项基础信息
export function addBaseInfo(data) {
    return request({
        url: "/assign/sp/base/add",
        method: "post",
        data,
    });
}

//修改专项基础信息
export function editBaseInfo(data) {
    return request({
        url: "/assign/sp/base/edit",
        method: "post",
        data,
    });
}

//删除 专项
export function delBaseInfo(specialProjectId) {
    return request({
        url: `/assign/sp/base/del/${specialProjectId}`,
        method: "get",
    });
}

//绑定柜门 专项基础信息
export function bandingGrid(data) {
    return request({
        url: "/assign/sp/base/banding/grid",
        method: "post",
        data,
    });
}

//新增 专项企业
export function addEnterprise(data) {
    return request({
        url: "/assign/sp/enterprise/add",
        method: "post",
        data,
    });
}

//编辑 专项企业
export function editEnterprise(data) {
    return request({
        url: "/assign/sp/enterprise/edit",
        method: "post",
        data,
    });
}

//删除 专项企业
export function delEnterprise(sprojectEnterpriseId) {
    return request({
        url: `/assign/sp/enterprise/del/${sprojectEnterpriseId}`,
        method: "get",
    });
}

//新增 专项交办问题
export function addProblem(data) {
    return request({
        url: "/assign/sp/problem/add",
        method: "post",
        data,
    });
}

//编辑 专项交办问题
export function editProblem(data) {
    return request({
        url: "/assign/sp/problem/edit",
        method: "post",
        data,
    });
}

//删除 专项交办问题
export function delProblem(spproblemId) {
    return request({
        url: `/assign/sp/problem/del/${spproblemId}`,
        method: "get",
    });
}

//新增 日常上报
export function addDr(data) {
    return request({
        url: "/assign/dr/add",
        method: "post",
        data,
    });
}

//修改 日常上报
export function editDr(data) {
    return request({
        url: "/assign/dr/edit",
        method: "post",
        data,
    });
}

//管理 日常上报
export function manageDr(data) {
    return request({
        url: "/assign/dr/manage",
        method: "post",
        data,
    });
}

//【NEW】专项主体列表
export function bodyList(data) {
    return request({
        url: "/assign/sp/body/list",
        method: "post",
        data,
    });
}

//【NEW】专项主体—交办问题 列表
export function getProblemList(data) {
    return request({
        url: "/assign/sp/body/problem/list",
        method: "post",
        data,
    });
}

//【NEW】专项主体—交办问题记录 列表
export function getRecordList(data) {
    return request({
        url: "/assign/sp/body/problem/record/list",
        method: "post",
        data,
    });
}

// 【NEW】专项记录 列表
export function getSpRecordList(data) {
    return request({
        url: "/assign/sp/record/list",
        method: "post",
        data,
    });
}

//【NEW】主体名称列表
export function getBodyList(data) {
    return request({
        url: "/assign/body/list",
        method: "post",
        data,
    });
}

//【NEW】新增 专项主体
export function addBodyAssign(data) {
    return request({
        url: "/assign/sp/body/add",
        method: "post",
        data,
    });
}

//【NEW】删除 专项主体
export function delAssignBody(assignBodyId) {
    return request({
        url: `/assign/sp/body/del/${assignBodyId}`,
        method: "get",
    });
}

//【NEW】编辑 专项主体
export function editAssignBody(data) {
    return request({
        url: `/assign/sp/body/edit`,
        method: "post",
        data
    });
}

//【NEW】新增 专题主体-交办问题
export function addBodyProblem(data) {
    return request({
        url: `/assign/sp/body/problem/add`,
        method: "post",
        data
    });
}

//【NEW】编辑 专题主体-交办问题
export function editBodyProblem(data) {
    return request({
        url: `/assign/sp/body/problem/edit`,
        method: "post",
        data
    });
}

//【NEW】删除 专项主体
export function delBodyProblem(assignProblemId) {
    return request({
        url: `/assign/sp/body/problem/del/${assignProblemId}`,
        method: "get",
    });
}

//【NEW】编辑 专题主体-交办问题
export function getAssignDailyPage(data) {
    return request({
        url: `/assign/daily/page`,
        method: "post",
        data
    });
}

// 【NEW】新增 专项记录
export function addSpRecord(data) {
    return request({
        url: `/assign/sp/record/add`,
        method: "post",
        data
    });
}

// 【NEW】编辑 专项记录
export function editSpRecord(data) {
    return request({
        url: `/assign/sp/record/edit`,
        method: "post",
        data
    });
}

//【NEW】删除 专项记录
export function delSpRecord(assignRecordId) {
    return request({
        url: `/assign/sp/record/del/${assignRecordId}`,
        method: "get",
    });
}

// 【NEW】 交办问题管理
export function problemManage(data) {
    return request({
        url: `/assign/problem/manage`,
        method: "post",
        data
    });
}

// 【NEW】日常上报 专项—主体 列表
export function assignDailyList(data) {
    return request({
        url: `/assign/daily/sp/body/list`,
        method: "post",
        data
    });
}

// 【NEW】日常上报 交办问题 列表
export function assignBodyProblemList(data) {
    return request({
        url: `/assign/daily/body/problem/list`,
        method: "post",
        data
    });
}


// 【NEW】日常上报 新增
export function assignAddDaily(data) {
    return request({
        url: `/assign/daily/add`,
        method: "post",
        data
    });
}

// 【NEW】 交办问题 流程
export function assignProblemFlow(data) {
    return request({
        url: `/assign/problem/flow`,
        method: "post",
        data
    });
}